:root {
    --color-black: #000000;
    --color-white: #ffffff;
    --color-grey-light: #e0e0e0;
    --color-grey-medium: #b3b3b3;
    --color-grey-dark: #a0a0a0;
    --color-grey-darker: #919496; /* Spotify grey */
    --color-grey-bg-card: #181818;
    --color-grey-bg-card-hover: #282828;
    --color-grey-bg-payment: #121212;
    --color-badge-bg: #333333;
    --color-primary: #ff7f1e; /* Orange */
    --color-btn-individual: #e8d8ff;
    --color-btn-individual-hover: #f0e6ff;
    --color-btn-family: #a0c3d2;
    --color-btn-family-hover: #b8d1dd;
    --color-btn-free: #535353;
    --color-btn-free-hover: #737373;
    --color-footer-icon-bg: #222326;
    --color-footer-icon-hover: #727272;
    --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-system);
    line-height: 1.5;
    color: var(--color-grey-light); /* Light grey default text */
    background-color: var(--color-black); /* Black background */
    /* Ensure flex layout for sticky footer if not already applied globally */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1; /* Ensure main content pushes footer down */
}

/* Header styles */
.main-header {
    background-color: var(--color-black); /* Black header background */
    padding: 1rem 2rem;
    box-shadow: 0 1px 10px rgba(255, 255, 255, 0.1); /* Subtle white shadow */
    position: sticky; /* Change from fixed if issues arise, or add padding-top to body */
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar-img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1); /* Ensure logo is white */
}

/* Hero section */
.hero-section {
    text-align: center;
    padding: 80px 20px 60px; /* Adjusted padding assuming sticky header */
    background-color: var(--color-black); /* Black background */
}

.hero-section h1 {
    font-size: 40px;
    font-weight: 900;
    margin-bottom: 16px;
    color: var(--color-white); /* White heading */
}

.hero-subtitle {
    font-size: 18px;
    color: var(--color-grey-medium); /* Lighter grey subtitle */
    margin-bottom: 32px;
}

/* Plans grid */
.plans-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 0 24px;
    max-width: 1200px;
    margin: 0 auto 60px;
}

/* Plan card styles */
.plan-card {
    background: var(--color-grey-bg-card); /* Spotify's darker grey */
    border-radius: 8px; /* Slightly less rounded */
    padding: 20px; /* Slightly reduced padding */
    box-shadow: none; /* Remove box shadow */
    transition: background-color 0.2s ease;
    border: none; /* Remove border */
}

.plan-card:hover {
    transform: none; /* Remove hover transform */
    background-color: var(--color-grey-bg-card-hover); /* Spotify's hover grey */
}

.plan-header {
    margin-bottom: 24px;
}

.plan-badge {
    display: inline-block;
    background: var(--color-badge-bg); /* Darker badge background */
    color: var(--color-white);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 16px;
}

.plan-header h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-white); /* White heading */
}

.price {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-white); /* White price */
}

.period {
    font-size: 16px;
    font-weight: 400;
    color: var(--color-grey-medium); /* Lighter grey */
}

.account-count {
    font-size: 14px;
    color: var(--color-grey-medium); /* Lighter grey */
    margin-bottom: 16px;
}

/* Plan features */
.plan-features ul {
    list-style: none; /* Remove default list style */
    padding-left: 0; /* Remove default padding */
    margin-bottom: 24px;
    margin-top: 24px; /* Add space above list */
}

.plan-features li {
    position: relative; /* Needed for pseudo-element */
    padding-left: 20px; /* Space for bullet */
    margin-bottom: 10px; /* Reduced space */
    font-size: 16px;
    color: var(--color-grey-light); /* Light grey text */
}

.plan-features li::before {
    content: "\2022"; /* Unicode for bullet */
    color: var(--color-grey-light); /* Bullet color */
    font-weight: bold;
    display: inline-block; 
    position: absolute;
    left: 0;
    top: 0; /* Align bullet */
}

/* Button styles */
.plan-button {
    width: 100%;
    padding: 12px 30px; /* Adjusted padding */
    border: none;
    border-radius: 500px;
    font-size: 14px; /* Slightly smaller font */
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.2s ease; /* Added transform transition */
    text-transform: none; /* Spotify buttons aren't uppercase */
}

.plan-button:hover {
   transform: scale(1.04); /* Spotify button hover scale */
}

/* Specific Button Colors */
.free-btn {
    background-color: var(--color-btn-free);
    color: var(--color-white);
}
.free-btn:hover {
    background-color: var(--color-btn-free-hover);
}

.individual-btn {
    background-color: var(--color-btn-individual);
    color: var(--color-black);
}
.individual-btn:hover {
    background-color: var(--color-btn-individual-hover); 
}

.family-btn {
    background-color: var(--color-btn-family);
    color: var(--color-black);
}
.family-btn:hover {
    background-color: var(--color-btn-family-hover); 
}

/* Terms text */
.terms {
    font-size: 11px; /* Smaller text */
    color: var(--color-grey-dark);
    margin-top: 20px; /* More space */
    text-align: left; /* Align left */
}

.terms a {
    color: var(--color-grey-dark);
    text-decoration: underline;
}

.terms a:hover {
    color: var(--color-white);
}

/* Payment methods section */
.payment-methods {
    text-align: center;
    padding: 40px 24px;
    background-color: var(--color-grey-bg-payment);
}

.payment-methods h2 {
    font-size: 28px;
    margin-bottom: 16px;
    font-weight: 700;
    color: var(--color-white);
}

.payment-description {
    font-size: 18px;
    color: var(--color-grey-medium);
    margin-bottom: 24px;
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.payment-icons img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: background-color 0.2s ease;
    margin: 5px;
    padding: 5px; /* Add padding to make the images inside smaller */
}

.payment-icons img:hover {
    background-color: var(--color-footer-icon-hover);
}

/* Spotify Footer Styles */
.spotify-footer {
    background-color: var(--color-black);
    color: var(--color-grey-darker); /* Spotify's grey text color */
    padding: 40px 0 25px; /* Reduced padding */
    font-size: 16px;
    line-height: 1.5;
    flex-shrink: 0; /* Ensure footer doesn't shrink */
    margin-top: 60px; /* Add margin if needed, e.g., after payment methods */
}

.spotify-footer-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-logo img {
    height: 40px; /* Adjust as needed */
    width: auto;
    filter: brightness(0) invert(1); /* Make logo white if needed */
}

.footer-columns {
    display: flex;
    flex-grow: 1;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 60px;
    margin-left: 60px; /* Space between logo and columns */
}

.footer-column h3 {
    color: var(--color-white);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: 22px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 15px;
}

.footer-column ul li a {
    color: var(--color-white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 400;
}

.footer-column ul li a:hover {
    color: var(--color-primary); /* Your brand hover color */
    text-decoration: underline;
}

.footer-social-icons {
    display: inline-flex; /* Keep icons grouped but allow column layout */
    flex-direction: column; /* Stack icons vertically */
    gap: 15px;
    /* Remove width: 100% from responsive if it exists */
}

.footer-social-icons a {
    background-color: var(--color-footer-icon-bg);
    color: var(--color-white);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.footer-social-icons a:hover {
    background-color: var(--color-footer-icon-hover);
    color: var(--color-white);
}

.footer-social-icons a i {
    font-size: 20px;
}

.spotify-footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0; /* Reduced top margin */
    padding: 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-legal-links a {
    color: var(--color-grey-darker);
    text-decoration: none;
}

.footer-legal-links a:hover {
    color: var(--color-white);
}

.footer-region-copy {
    display: flex;
    flex-direction: column; /* Stack region and copyright */
    align-items: flex-end;
    text-align: right;
    gap: 10px;
}

.footer-region-copy span {
    color: var(--color-grey-darker);
}

.footer-region-copy span i {
    margin-right: 5px;
}

/* Responsive adjustments for Spotify Footer */
@media (max-width: 768px) {
    .hero-section {
        padding: 120px 16px 40px; /* Increased padding-top for more space below navbar */
    }

    .hero-section h1 {
        font-size: 32px;
    }

    .plans-grid {
        /* Keep 1 column layout for smaller screens */
        grid-template-columns: 1fr;
        padding: 0 16px;
    }

    .payment-methods {
        padding: 40px 16px;
    }
    .payment-icons img {
        height: 30px;
    }

    /* Navbar Mobile Menu */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        z-index: 1001;
    }

    .bar {
        height: 3px;
        width: 25px;
        background-color: var(--color-white);
        margin: 4px 0;
        transition: 0.3s;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--color-black);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        transition: 0.3s;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-item {
        margin: 10px 0;
        text-align: center;
        width: 100%;
    }
    
    .nav-item a {
        display: block;
        padding: 10px;
        font-size: 16px;
    }

    /* Spotify Footer Responsive */
    .spotify-footer-main {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-columns {
        width: 100%;
        gap: 30px;
    }
    .footer-column {
        width: calc(50% - 15px); /* Two columns on medium screens */
    }
    .footer-social-icons {
         margin-top: 30px;
         align-items: flex-start; /* Align icons to left on mobile stack */
    }
    .spotify-footer-bottom {
        margin-top: 40px;
        flex-direction: column-reverse; /* Stack copyright above links */
        align-items: flex-start;
        gap: 20px;
    }
    .footer-region-copy {
        align-items: flex-start;
        text-align: left;
    }
}

@media screen and (max-width: 576px) {
    .footer-column {
        width: 100%; /* Single column on small screens */
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.plan-card {
    animation: fadeIn 0.5s ease-out forwards;
}

.plan-card:nth-child(1) { animation-delay: 0.1s; }
.plan-card:nth-child(2) { animation-delay: 0.2s; }
.plan-card:nth-child(3) { animation-delay: 0.3s; }

/* Larger Screens (Optional: Add specific styles if needed) */
@media (min-width: 1200px) {
    /* Example: Maybe slightly larger fonts or padding if desired */
}

/* Medium Screens/Tablets (Adjusting 2-column layout) */
@media (max-width: 992px) {
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 100%;
        padding: 0 20px;
    }

    .footer-columns {
        margin-left: 0; 
        justify-content: flex-start;
    }
    .footer-social-icons {
        margin-top: 20px;
        align-items: flex-end;
    }
}

/* Small Tablets & Large Phones (Transition to 1 column) */
@media (max-width: 768px) {
    .main-header {
        padding: 0.8rem 1rem;
    }
    .navbar-img {
        height: 35px;
    }

    .hero-section {
        padding: 60px 16px 40px;
    }
    .hero-section h1 {
        font-size: 30px;
    }
    .hero-subtitle {
        font-size: 16px;
    }

    .plans-grid {
        grid-template-columns: 1fr;
        padding: 0 16px;
        max-width: 100%;
        margin-bottom: 40px;
    }

    .plan-card {
        padding: 16px;
    }

    .payment-methods {
        padding: 40px 16px;
    }
    .payment-methods h2 {
        font-size: 20px;
    }
    .payment-icons img {
        height: 30px;
        gap: 20px;
    }

    /* Spotify Footer Responsive */
    .spotify-footer {
        padding: 60px 0 30px;
    }
    .spotify-footer-main {
        flex-direction: column;
        align-items: flex-start;
        gap: 30px;
    }
    .footer-columns {
        width: 100%;
        gap: 30px;
    }
    .footer-column {
        width: calc(50% - 15px); /* Still 2 columns here */
    }
    .footer-social-icons {
         margin-top: 30px;
         align-items: flex-start; /* Align icons to left on mobile stack */
    }
    .spotify-footer-bottom {
        margin-top: 40px;
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 20px;
    }
    .footer-region-copy {
        align-items: flex-start;
        text-align: left;
    }
}

/* Small Phones */
@media (max-width: 576px) {
    .hero-section {
        padding-top: 100px; /* Slightly less padding for smaller screens but still enough for spacing */
    }
    .hero-section h1 {
        font-size: 26px;
    }
    .hero-subtitle {
        font-size: 15px;
    }

    .plan-header h2 {
        font-size: 20px;
    }
    .price {
        font-size: 20px;
    }
    .plan-features li {
        font-size: 15px;
    }
    .plan-button {
        padding: 10px 25px;
        font-size: 13px;
    }
    .terms {
        font-size: 10px;
    }

    .footer-column {
        width: 100%; /* Single column for footer links */
    }
    .footer-social-icons a {
        width: 45px;
        height: 45px;
    }
     .footer-social-icons a i {
        font-size: 18px;
    }
    .spotify-footer-bottom {
        font-size: 11px;
    }
}

/* Add generic focus style */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px; 
}

/* Navbar styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    padding: 10px 20px;
    box-shadow: none; /* Remove shadow */
    background-color: var(--color-black);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

body.scrolled .navbar {
    opacity: 0.5;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links h1 {
    margin: 0 15px;
    font-size: 18px;
    font-weight: 700;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-white);
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-item a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.nav-item a:hover::after {
    width: 100%;
}

.home a {
    text-decoration: none;
    color: var(--color-white);
    position: relative;
    transition: font-size 0.3s ease, color 0.3s ease;
}

.home a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.home a:hover::after {
    width: 100%;
}

/* Menu toggle animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}
